﻿using IntoLog;
using IntoStationSystem.Models;
using IntoStationSystem.PLC;
using Prism.Ioc;

namespace IntoStationSystem.ViewModels
{
    public class Locator
    {
        private readonly IContainerProvider _provider;
        public static Locator Instance = null;
        public Locator(IContainerProvider provider)
        {
            _provider = provider;
        }
        public Service Service => _provider.Resolve<Service>();

        public DCFanModel Fan => _provider.Resolve<DCFanModel>();
        public IV3CameraModel Camera => _provider.Resolve<IV3CameraModel>();
        public LeakageModel Leakage => _provider.Resolve<LeakageModel>();
        public RfidModel Rfid => _provider.Resolve<RfidModel>();
        public TechTighten Tighten => _provider.Resolve<TechTighten>();

        //ViewModel
        public MainWindowViewModel MainWindowVM => _provider.Resolve<MainWindowViewModel>();
        public IOStateViewModel IOStateVM => _provider.Resolve<IOStateViewModel>();
        public HomeViewModel MainPageVM => _provider.Resolve<HomeViewModel>();
        public ManualViewModel ManualVM => _provider.Resolve<ManualViewModel>();
        public ProductSettingViewModel ProductSettingVM => _provider.Resolve<ProductSettingViewModel>();
        public LoginViewModel LoginVM => _provider.Resolve<LoginViewModel>();
        public ResetPartCodeViewModel ResetPartCodeVM => _provider.Resolve<ResetPartCodeViewModel>();
        public LogService Log => _provider.Resolve<LogService>();
    }
}
